import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/special'
        },
        {
            path: '/',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            meta: { title: '自述文件' },
            children:[
                {
                    path: '/special',
                    component: resolve => require(['../components/page/newSpecial.vue'], resolve),
                    meta: { title: '新建专项' }
                },
                {
                    path: '/zaiban',
                    component: resolve => require(['../components/page/InOffice.vue'], resolve),
                    meta: { title: '在办中' }
                },
                {
                    //已废弃
                    path: '/detail',
                    component: resolve => require(['../components/page/InOfficeDetail.vue'], resolve),
                    meta: { title: '在办详情' }
                },
                {
                    //现在使用的
                    path: '/detail01',
                    component: resolve => require(['../components/page/InOfficeDetail01.vue'], resolve),
                    meta: { title: '在办详情' }
                },
                // {
                //     path: '/detail',
                //     component: resolve => require(['../components/page/InOfficeDetail.vue'], resolve),
                //     meta: { title: '在办中' }
                // },
                {
                    path: '/yibanjie',
                    component: resolve => require(['../components/page/Completed.vue'], resolve),
                    meta: { title: '已办结' }
                },
                {
                    path: '/yibanjie01',
                    component: resolve => require(['../components/page/CompletedDetail.vue'], resolve),
                    meta: { title: '已办结详情' }
                },
                {
                    path: '/form',
                    component: resolve => require(['../components/page/BaseForm.vue'], resolve),
                    meta: { title: '标签管理' }
                },
                {
                    path: '/fixed',
                    component: resolve => require(['../components/page/fixed.vue'], resolve),
                    meta: { title: '固定专项' }
                }, {
                    path: '/custom',
                    component: resolve => require(['../components/page/custom.vue'], resolve),
                    meta: { title: '自定义专项' }
                },
                // {
                //     // 富文本编辑器组件
                //     path: '/editor',
                //     component: resolve => require(['../components/page/VueEditor.vue'], resolve),
                //     meta: { title: '富文本编辑器' }
                // },
                // {
                //     // markdown组件
                //     path: '/markdown',
                //     component: resolve => require(['../components/page/Markdown.vue'], resolve),
                //     meta: { title: 'markdown编辑器' }
                // },
                // {
                //     // 图片上传组件
                //     path: '/upload',
                //     component: resolve => require(['../components/page/Upload.vue'], resolve),
                //     meta: { title: '文件上传' }
                // },
                // {
                //     // vue-schart组件
                //     path: '/charts',
                //     component: resolve => require(['../components/page/BaseCharts.vue'], resolve),
                //     meta: { title: 'schart图表' }
                // },
                // {
                //     // 拖拽列表组件
                //     path: '/drag',
                //     component: resolve => require(['../components/page/DragList.vue'], resolve),
                //     meta: { title: '拖拽列表' }
                // },
                // {
                //     // 权限页面
                //     path: '/permission',
                //     component: resolve => require(['../components/page/Permission.vue'], resolve),
                //     meta: { title: '权限测试', permission: true }
                // },
                // {
                //     path: '/404',
                //     component: resolve => require(['../components/page/404.vue'], resolve),
                //     meta: { title: '404' }
                // },
                // {
                //     path: '/403',
                //     component: resolve => require(['../components/page/403.vue'], resolve),
                //     meta: { title: '403' }
                // }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})
